Total Complexity | 3 |
Total Lines | 29 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import "animate.css"; |
||
7 | const textInput = window.document.getElementById( |
||
8 | "bilinformasjon" |
||
9 | ) as HTMLInputElement; |
||
10 | const textForm = window.document.getElementById( |
||
11 | "regnrform" |
||
12 | ) as HTMLFormElement; |
||
13 | |||
14 | if (textInput && textForm) { |
||
15 | console.log("textForm before:", textForm); |
||
16 | |||
17 | textInput.addEventListener("input", checkValidText); |
||
18 | //textForm.addEventListener("submit", sendForm as any); |
||
19 | textForm.addEventListener("submit", (event) => { |
||
20 | alert("Submit!"); |
||
21 | event.preventDefault(); |
||
22 | }); |
||
23 | |||
24 | console.log("textForm after:", textForm); |
||
25 | } |
||
26 | }; |
||
27 | |||
28 | initialize(); |
||
29 |